package com.homework.ch13;

/**
 * @author yuxi
 * @version 1.0
 * @date 2025/10/21
 * @Description:
 */
public class Teacher {
    private String name;
    private int age;
    private double salary;

    public Teacher() {
    }

    private Teacher(String name, int age, double salary) {
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    private double getSalary() {
        return salary;
    }

    private void setSalary(double salary) {
        this.salary = salary;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", salary=" + salary +
                '}';
    }
}
